﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ZHDJ.Core.Log;
using ZHDJ.Data;

namespace ZHDJ.Web.PortalParts
{
    public partial class FooterNew : System.Web.UI.UserControl
    {
        public static AppBoxContext DB
        {
            get
            {
                if (!HttpContext.Current.Items.Contains("__AppBoxContext"))
                {
                    HttpContext.Current.Items["__AppBoxContext"] = new AppBoxContext();
                }
                return HttpContext.Current.Items["__AppBoxContext"] as AppBoxContext;
            }
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            //try
            //{
            //    var data = DB.PartyVisitStatistics.ToList()[0];
            //    if (data != null)
            //    {
            //        litLoginCount.Text = data.LoginCount.ToString();
            //        litOnlineCount.Text = data.OnlineCount.ToString();
            //        litTodayLoginCount.Text = data.TodayLoginCount.ToString();
            //        litTodayVisitCount.Text = data.TodayVisitCount.ToString();
            //        litVisitCount.Text = data.VisitCount.ToString();
            //    }
            //}
            //catch (Exception ex)
            //{
            //    Log4netHelper.WriteLog(ex);
            //}
        }
    }
}